package com.alibaba.citrus.cr.sales.plan.dto.api.request;

import com.alibaba.citrus.cr.sales.plan.BaseRequest;
import com.alibaba.citrus.cr.sales.plan.CustomLockKey;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 提报单请求体
 * @author zls
 * @date 2021年09月24日16:45:45
 */
@Getter
@Setter
public class SalesPlanReportRequest extends BaseRequest implements CustomLockKey {

    private static final long serialVersionUID = 376477628430187855L;

    /**
     * 提报单id
     */
    private String reportOrderId;

    /**
     * 提报单idList
     */
    private List<String> reportOrderIdList;

    /**
     * 月度计划ID
     */
    private String planId;

    /**
     * 月度时间（冗余传进来，不用单独去查询）
     */
    private String planTime;

    /**
     * 业务类型 1：提报 2：调整
     */
    private Integer model;

    /**
     * 业务id
     */
    private String modelId;

    /**
     * 是否是业务员
     */
    private Boolean isSales;

    /**
     * 关联组织类型
     */
    private Integer relationOrganizationType;

    /**
     * 关联组织id
     */
    private String relationOrganizationId;

    /**
     * 是否小程序提报
     */
    private Boolean appletSubmission;

    /**
     * 月度计划明细idList
     */
    private List<String> salesPlanDetailIdList;

    /**
     * 操作人角色
     */
    private List<String> roleCodes;

    private String roleCodeString;

    @Override
    public String getCustomLockCondition() {
        return planId + model + modelId;
    }
}
